<%@ page pageEncoding='UTF-8'%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:set var="contextPath" value="#request.get('javax.servlet.forward.context_path')" scope="request" />
<!DOCTYPE html>
<head>
    <title>Patient List</title>
    <%-- header --%>
    <jsp:include page="/WEB-INF/content/common/Header.jsp" flush="true"/>
</head>
<body class="metro lists">
	<%-- tob-bar --%>
    <jsp:include page="/WEB-INF/content/common/TopBar.jsp" flush="true"/>
       	
	<div id="main-container" class="body-wrapper">
        <%-- tob-container --%>
    	<jsp:include page="/WEB-INF/content/common/TopContainer.jsp" flush="true"/>
        
    	<div id="drugissue-list-container" class="list-container">
        	<%-- header-container --%>
       		<s:set var="mode" value="'list'"/>
   			<jsp:include page="/WEB-INF/content/drugIssue/DrugIssueMenuContainer.jsp" flush="true"/>
   			
            <div class="listview-outlook list-continue">
            	<s:iterator var="oGuiPrescription" value="%{guiPrescriptionList}">
                	<a href="${contextPath}/drugissue/show?prescriptionId=${oGuiPrescription.prescriptionId}" class="list">
                    	<div class="list-content">
                        	<div class="list-icon-container place-left">
         						<s:if test="%{#oGuiPrescription.patient.male}">
          							<img class="list-icon bg-lightBlue" src="${contextPath}/img/icon/Man-128.png"/>
         						</s:if>
         						<s:elseif test="%{#oGuiPrescription.patient.female}">
          							<img class="list-icon bg-lightPink" src="${contextPath}/img/icon/Woman-128.png"/>
         						</s:elseif>
        					</div>
                        	<div class="place-left">
                            	<span class="list-title">${oGuiPrescription.patient.name}</span>
                                <span class="list-subtitle">Date Of Birth: ${oGuiPrescription.patient.dobString}</span>
         						<span class="list-remark">${oGuiPrescription.patient.gender}</span>
                            </div>
                            <div class="btn-container place-right">
								<h2><i class="icon-file-4 bg-lightBlue fg-white"></i></h2>
							</div>
                            <br clear="all"/>
                        </div>
                    </a>
                </s:iterator>
            </div>
            
           <div class="pagination no-print">           	
                <ul>
                    <li class="first ${guiPagination.activePage == guiPagination.firstPage ? 'disabled' : ''}">
                        <a href="${contextPath}/drugissue/list?page=${guiPagination.firstPage}"><i class="icon-first-2"></i></a>
                    </li>
                    <li class="prev ${guiPagination.activePage == guiPagination.firstPage ? 'disabled' : ''}">
                        <a href="${contextPath}/drugissue/list?page=${guiPagination.prevPage}"><i class="icon-previous"></i></a>
                    </li>
                    <s:iterator status="stat" begin="1" end="%{guiPagination.noOfPages}">
                        <li class="${guiPagination.activePage == stat.count ? 'active' : ''}">
                            <a href="${contextPath}/drugissue/list?page=${stat.count}">${stat.count}</a>
                        </li>
                    </s:iterator>         
                    <li class="next ${guiPagination.activePage == guiPagination.lastPage ? 'disabled' : ''}">
                        <a href="${contextPath}/drugissue/list?page=${guiPagination.nextPage}"><i class="icon-next"></i></a>
                    </li>
                    <li class="last ${guiPagination.activePage == guiPagination.lastPage ? 'disabled' : ''}">
                        <a href="${contextPath}/drugissue/list?page=${guiPagination.lastPage}"><i class="icon-last-2"></i></a>
                    </li>
                </ul>
            </div>
            
        </div>
        
        <%-- bottom-container --%>
    	<jsp:include page="/WEB-INF/content/common/BottomContainer.jsp" flush="true"/>
        
	</div>
    
    <%-- footer-container --%>
    <jsp:include page="/WEB-INF/content/common/FooterContainer.jsp" flush="true"/>
    
</body>
</html>